<!-- {{nextTitle}} -->
<div>
  <form class="form-horizontal" role="form" novalidate name="stForm">
    <div class="form-ctrl md-whiteframe-z1">
      <div class="form-search" style="height:270px;" ng-class="{true: 'shou'}[shoumun.flag==0]" ng-switch on="sendData.timeTypeCode">
      <!-- 时间粒度   -->
      <div>
        <label style="width:70px">时间粒度</label>
        <md-select ng-model="sendData.timeTypeCode" >
          <md-option ng-value="tim.timeTypeCode" ng-repeat="tim in timeTypes">{{tim.timeTypeName}}</md-option>
        </md-select>
      </div>

      <div ng-switch-when="1">
        <md-input-container  flex>
          <label>开始时间</label>
          <input ng-model="sendData.startTime"  type="date" end-time="sendData.endTime" time-validate="day" name="kaishi" required></input>
          <div ng-messages="stForm.kaishi.$error">
            <div ng-message="date">请正确输入时间</div>
            <div ng-message="time-error">结束时间不应小于开始时间</div>
          </div>
        </md-input-container>
      </div>
      <div ng-switch-when="1">
        <md-input-container flex>
          <label>结束时间</label>
          <input ng-model="sendData.endTime"  type="date" start-time="sendData.startTime" time-validate="day" name="jieshu" required></input>
          <div ng-messages="stForm.jieshu.$error">
            <div ng-message="date">请正确输入时间</div>
            <div ng-message="time-error">结束时间不应小于开始时间</div>
            <div ng-message="too-great">结束时间不应大于当前时间</div>
          </div>
        </md-input-container>
      </div>


      <div ng-switch-when="0">
        <md-input-container  flex>
          <label>开始时间</label>
          <input ng-model="sendData.startTime"  type="datetime-local" end-time="sendData.endTime" time-validate="month" name="kaishi" required></input>
          <div ng-messages="stForm.kaishi.$error">
            <div ng-message="date">请正确输入时间</div>
            <div ng-message="time-error">结束时间不应小于开始时间</div>
          </div>
        </md-input-container>
      </div>
      <div ng-switch-when="0">
        <md-input-container flex>
          <label>结束时间</label>
          <input ng-model="sendData.endTime"  type="datetime-local" start-time="sendData.startTime" time-validate="month" name="jieshu" required></input>
          <div ng-messages="stForm.jieshu.$error">
            <div ng-message="date">请正确输入时间</div>
            <div ng-message="time-error">结束时间不应小于开始时间</div>
            <div ng-message="too-great">结束时间不应大于当前时间</div>
          </div>
        </md-input-container>
      </div>
        <!-- 统计范围(业务系统) -->
        <div>
          <label style="width:70px">统计范围</label>
          <md-select ng-disabled='true' ng-model="sendData.systemCode" aria-label="统计范围">
            <md-option ng-value="1">统一支付</md-option>
          </md-select>
        </div>
        <!-- 渠道名称(3条业务线，天猫等) -->
        <div>
            <label style="width:70px">渠道名称</label>
            <md-select ng-model="sendData.businessLine" >
              <md-select-label>
                {{sendData.businessLine ? _getNames(sendData.businessLine,'businessLineName') :'全部'}}
              </md-select-label>
              <md-option ng-value="" ng-click="getBL()">全部</md-option>
              <md-option ng-value="item" ng-repeat="item in businessLine"ng-click="getBL()">{{item.businessLineName}}</md-option>
            </md-select>
          </div>
        <!-- 业务名称 -->
        <div>
            <label style="width:70px">业务名称</label>
            <md-select multiple ng-model="sendData.tradeTypeCode" disabled ng-if="!close.tradeType">
              <md-select-label>全部</md-select-label>
            </md-select>
            <md-select multiple ng-model="sendData.tradeTypeCode"  ng-if="close.tradeType">
              <md-select-label>
                {{sendData.tradeTypeCode.length ? _getNames(sendData.tradeTypeCode,'tradeTypeName',tradeTypes) :'全部'}}
              </md-select-label>
              <md-option ng-value="" ng-click="_checkAll(sendData,'tradeTypeCode')">全部</md-option>
              <md-option ng-value="tradeType" ng-repeat="tradeType in tradeTypes">{{tradeType.tradeTypeName}}</md-option>
            </md-select>
          </div>
        <!-- 区域(省份) -->
        <div>
          <label style="width:70px">区域</label>
          <md-select multiple ng-model="sendData.provinceCode" required>
            <md-select-label>
              <!--  {{sendData.province.length  ? (sendData.province.provinceName ==='不分省' ? '不分省':_getNames(sendData.province,'provinceName',selector.province)) :selectLabel}} -->
              {{sendData.provinceCode.length  ? _getNames(sendData.provinceCode,'provinceName',provinces) :'全部'}}
            </md-select-label>
            <md-option ng-value="" ng-click="_checkAll(sendData,'provinceCode','全部')">全部</md-option>
            <md-option ng-value="pro" ng-repeat="pro in provinces">{{pro.provinceName}}</md-option>
          </md-select>
        </div>

      </div>
      <i class="glyphicon glyphicon-chevron-up shrinkage" ng-show="isBU" ng-click="shoumun.flag=0"></i>
      <!-- ng-disabled="stForm.$invalid" -->
      <md-button ng-click="shoumun.flag==1?shoumun.flag=0:shoumun.flag=1;searchST()"  class="md-fab md-primary md-hue-1" aria-label="Profile">
        <i class="glyphicon glyphicon-arrow-down" style="margin-top:28px;" ng-show="shoumun.flag==0"></i>
        <i class="glyphicon glyphicon-search" ng-show="shoumun.flag==1"></i>
      </md-button>
    </div>
  </form>
  <div id="current" style="height:500px;" ng-show="isBU"></div>
</div>
<!-- <md-button ng-show="isBU" class="md-raised" ng-show="isBU"  ng-click="isBU=!isBU"> 返回</md-button> -->
<!-- <div id="current_xiazuan" style="height:500px;" ng-show="isBU"></div> -->
<!-- <core-loading ng-show= 'load.flag'></core-loading> -->

